#include "stdafx.h"
#include "MyLoader.h"


int MyLoader::proccessNum=5; 

MyLoader::MyLoader(void)
{
}


MyLoader::~MyLoader(void)
{
}

MyProccess *MyLoader::loadProcessFromBuffer(BYTE *mybuffer,int proccessnum=5){
	proccessNum=proccessnum;
	mps=new MyProccess[proccessNum];
	for(int i=0;i<proccessNum;i++){
		mps[i].arrivedTime=(char )mybuffer[i*3]-'0';
		mps[i].runTime=(char )mybuffer[i*3+1]-'0';
		mps[i].priority=(char )mybuffer[i*3+2]-'0';
		mps[i].leftTime=mps[i].runTime;
	}
	return mps;
}
MyLoader &MyLoader::operator=(const MyLoader * ml){
	
	return *this;
}